package xuhaijia.lanou3g.autohome.forum.normalforum;
//                .-~~~~~~~~~-._       _.-~~~~~~~~~-.
//            __.'              ~.   .~              `.__
//          .'//                  \./                   \\`.
//        .'//            为什么坚持  想一想当初             \\`.
//      .'// .-~"""""""~~~~-._     |     _,-~~~~"""""""~-.  \\`.
//    .'//.-"                 `-.  |  .-'                 "-. \\`.
//  .'//______.============-..   \ | /   ..-============._______\\`.
//.'//____________________________\|/_____________________________\\`.
// 
//                             

import android.content.Intent;
import android.os.Bundle;
import android.os.Parcelable;
import android.util.Log;
import android.view.View;
import android.widget.LinearLayout;

import java.util.ArrayList;
import java.util.HashMap;

import xuhaijia.lanou3g.autohome.R;
import xuhaijia.lanou3g.autohome.activity.MainActivity;
import xuhaijia.lanou3g.autohome.base.BaseFragment;
import xuhaijia.lanou3g.autohome.base.NetTool;
import xuhaijia.lanou3g.autohome.base.StringValues;
import xuhaijia.lanou3g.autohome.base.URLValues;

/**
 * Created by 7 on 16/8/16.
 */
public class NormalForumFragment extends BaseFragment implements View.OnClickListener {

    private LinearLayout carTypeForum;
    private LinearLayout locationForum;
    private LinearLayout themeForum;

    @Override
    protected int setLayout() {
        return R.layout.fragment_normalforum;
    }

    @Override
    protected void initView() {
        carTypeForum = bindView(R.id.normalforum_car);
        locationForum = bindView(R.id.normalforum_location);
        themeForum = bindView(R.id.normalforum_theme);
        carTypeForum.setOnClickListener(this);
        locationForum.setOnClickListener(this);
        themeForum.setOnClickListener(this);
    }

    @Override
    protected void initData() {
        MainActivity mainActivity = (MainActivity) getActivity();
        mainActivity.drawDrawer();
    }

    @Override
    public void load() {

    }

    @Override
    public void refresh() {

    }


    @Override
    public void onClick(View v) {
        Intent intent = new Intent();
        switch (v.getId()) {
            case R.id.normalforum_car:
                intent.setAction(StringValues.CARTYPE);
                getActivity().sendBroadcast(intent);
                break;
            case R.id.normalforum_location:
                intent.setAction(StringValues.LOCATION);
                getActivity().sendBroadcast(intent);

                break;
            case R.id.normalforum_theme:
                intent.setAction(StringValues.THEME);
                getActivity().sendBroadcast(intent);
                break;
        }
    }
}
